home *** CD-ROM | disk | FTP | other *** search
- property pFieldName, pSpecOrText, pCheckMark, pMenu
- global gMenuObjects, gMenuPick, gDisplaySize
-
- on birth me, arguments
- set the pFieldName of me to the fieldName of arguments
- set the pSpecOrText of me to the specOrText of arguments
- set the pCheckMark of me to the checkMark of arguments
- set popupText to field the fieldName of arguments
- set menuInstance to popup(mnew, popupText)
- set the pMenu of me to menuInstance
- if the machineType = 256 then
- menuInstance(mRegister, "PPXW200-1375967771")
- else
- menuInstance(mRegister, "PPXM200-3953797641")
- menuInstance(mSetAutoMark, the pCheckMark of me)
- end if
- return me
- end
-
- on menuMouseDown me
- set whichMenu to the pMenu of me
- if the pSpecOrText of me = "spec" then
- set gMenuPick to whichMenu(mPopupSpec, the left of sprite the clickOn, the bottom of sprite the clickOn)
- else
- set gMenuPick to whichMenu(mPopupText, the left of sprite the clickOn, the bottom of sprite the clickOn)
- end if
- if gMenuPick > 0 then
- put line value(gMenuPick) of field the pFieldName of me into field "MenuChoice"
- set gDisplaySize to gMenuPick
- showDisplaySize()
- end if
- end
-
- on menuGetMenuInstance me
- set whichMenu to the pMenu of me
- return whichMenu
- end
-
- on addUnique theList, theItem
- if getOne(theList, theItem) = 0 then
- add(theList, theItem)
- end if
- end
-
- on death me
- deleteProp(gMenuObjects, the pFieldName of me)
- end
-